

def main():
    f1 = open(intent1,'r',encoding='utf-8')
    f2 = open(intent2,'r',encoding='utf-8')
    f3 = open(intent3,'r',encoding='utf-8')
    lines1 = f1.readlines()
    lines2 = f2.readlines()
    lines3 = f3.readlines()

    f1.close()
    f2.close()
    f3.close()
    i=0
    j=0
    res=[]
    for line1,line2,line3 in zip(lines1,lines2,lines3):
        if (line1!=line2 or line1!=line3) and line2==line3 and '流量' in line2:
            print(i)
            print(line1,line2,line3)
            line1=line2
            j+=1
        i+=1
        res.append(line1)
    print(j)
    fo = open(new_intent,'w',encoding='utf-8')
    fo.writelines(res)

if __name__ == '__main__':
    intent1 = '../data/intent_0926/intent_0925_submit_res_rnn0926'
    intent3 = '../data/intent_0926/intent_0925_submit_res_cnn0926'
    intent2 = '../data/intent_0929/intent_0925_submit_res_rnn0929'
    new_intent='../data/intent_0929/intent_0925_submit_res_mergy0929_1'
    main()